home *** CD-ROM | disk | FTP | other *** search
- #define CURSES_LIBRARY 1
- #include <curses.h>
- #undef PDC_usleep
-
- #if defined(DOS) && defined(MSC)
- #include <time.h>
- #endif
-
- #ifdef PDCDEBUG
- char *rcsid__usleep = "$Header: C:\CURSES\private\RCS\_usleep.c 2.1 1993/06/18 20:23:54 MH Rel MH $";
- #endif
-
-
-
- /*man-start*********************************************************************
-
- PDC_usleep() - waits for specified number of microseconds
-
- PDCurses Description:
- This routine is intended to provide a mechanism to wait the
- specified number of microseconds. This routine is provided for
- users of the Microsoft compilers under DOS as the default
- library does not provide a suitable function.
- Under any other Operating System/Compiler option, this function
- does nothing.
-
- Portability:
- PDCurses void PDC_usleep( clock_t );
-
- Acknowledgement
- PDC_usleep() was written by John Steele (jsteele@netcom.com)
-
- **man-end**********************************************************************/
-
- #if defined(DOS) && defined(MSC)
- void PDC_usleep(clock_t wait)
- {
- clock_t goal;
- #ifdef PDCDEBUG
- if (trace_on) PDC_debug("PDC_usleep() - called\n");
- #endif
-
- goal = wait + clock();
- while (goal > clock())
- ;
- return;
- }
- #else
- void PDC_usleep(long wait)
- {
- #ifdef PDCDEBUG
- if (trace_on) PDC_debug("PDC_usleep() - called\n");
- #endif
-
- return;
- }
- #endif
-